#

from common.login import Login
import time, random


class quiry():
    def __init__(self):
        self.st = Login()
        self.driver = self.st.driver

    def add_pool(self):
        # 使用超级管理员账号登录
        self.st.login_user('超级管理员')


        #解除二级密码
        self.driver.find_element_by_id('btn-decrypt').click()
        time.sleep(2)
        self.driver.find_element_by_name('secondPass').send_keys('woniu123')
        self.driver.find_element_by_xpath('//*[@id="secondPass-modal"]/div/div/div[3]/button').click()
        time.sleep(2)
        try:
            self.driver.find_element_by_xpath('/html/body/div[9]/div/div/div[3]/button').click()
            print('解密失败')
        except:
            print('解密成功')


if __name__ == '__main__':
    start = quiry()
    start.add_pool()


